//
//  NSString+StringForTime.m
//  New_Runway
//
//  Created by NewLife on 2018/2/24.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "NSString+StringForTime.h"

@implementation NSString (StringForTime)

+ (instancetype)getTimeStringWithFormatString:(NSString *)formatStr {
    
    NSDateFormatter *format = [[NSDateFormatter alloc] init];
    [format setDateFormat:formatStr];
    return [format stringFromDate:[NSDate dateWithTimeIntervalSinceNow:0]];
}

+ (instancetype)getTimeWithYYYY_MM_dd_HH_mm {
    
    return [self getTimeStringWithFormatString:@"yyyy-MM-dd HH:mm"];
}

@end
